﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _11_自定义控件
{
    public class NodeClass
    {
        /// <summary>
        /// 节点名称
        /// </summary>
        public string NodeName { get; set; }
        /// <summary>
        /// X坐标
        /// </summary>
        public int X { get; set; }
        /// <summary>
        /// Y坐标
        /// </summary>
        public int Y { get; set; }
        /// <summary>
        /// 节点颜色
        /// </summary>
        public Color NodeColor { get; set; }

        public NodeClass(string nodeName, int x, int y, Color nodeColor)
        {
            NodeName = nodeName;
            X = x;
            Y = y;
            NodeColor = nodeColor;
        }

        public override string ToString()
        {
            return string.Format($"{NodeName}({X},{Y})");
        }

    }
}
